export default function UserProfile() {
  // 定义两个变量
  const userName = "Admin";
  const role = "Manager";

  interface UserCarProps {
    name: string;
    role: string;
    age: number;
  }

  return (
    <div style={{ padding: "50px", fontFamily: "sans-serif" }}>
      {/* 显示名称 */}
      <h1>用户资料卡</h1>
      <hr />
      <p>
        <strong>姓名:</strong>
        {userName}
      </p>{" "}
      <p>
        <strong>角色:</strong>
        {role}
      </p>
      {/* 显示角色 */}
      {role === "Manager" && (
        <p>
          <strong>权限:</strong>
          最高权限
        </p>
      )}
    </div>
  );
}
